package com.jbh.wanandroidkotlin.activity

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.jbh.apilibrary.api.Api
import com.jbh.apilibrary.api.MyCookieJar
import com.jbh.wanandroidkotlin.R
import com.jbh.wanandroidkotlin.manager.AppActivityManager
import com.jbh.wanandroidkotlin.manager.UserInfoManager
import kotlinx.android.synthetic.main.activity_setting_list.*

class SettingListActivity : BaseActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_setting_list)

        btnLoginOut.setOnClickListener {
            loginOut()
            AppActivityManager.instance.exit()
        }
    }


    /**
     * 退出登录
     */
    fun loginOut(){
        UserInfoManager.newInstance().clear()
        AppActivityManager.instance.exit(LoginActivity::class.java.simpleName)
        MyCookieJar.clearCookie()
    }


}